<?php

use Illuminate\Database\Seeder;

class ManagerTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //用户表
        //产生实例
        $faker = \Faker\Factory::create('zh_CN');
        //循环产生数据
        $data = [];

        for($i=0;$i<100;$i++){
            $data[]=[

                'name' => $faker->userName, //产生用户名
                'password' => md5('123456'),
                'sex' => rand(1,2),
                'status' => rand(0,2),
                'user_img'=>'/static/头像_180.jpg',
                'created_at'	=>		date('Y-m-d H:i:s'),
                'email' => $faker->email,

            ];
        }
        \Illuminate\Support\Facades\DB::table('manager')->insert($data);

    }
}
